package Java.BlackHorse.Exception;

public class ExceptionDemo1 {
    /*
    * 异常常用方法
    * public String getMessage()
    * public String toString()
    * public void printStackTrace()
    * */
    public static void main(String[] args) {
        int[] arr = {1,2,3,4,5};
        try {
            System.out.println(arr[10]);
            System.out.println("猜猜我执行了吗？");
        } catch (Exception e) {
//            String err = e.getMessage();
//            String err = e.toString();

//            System.out.println(err);

            e.printStackTrace();
        }

        System.out.println("猜猜我执行了吗？");

    }
}
